module.exports = {
  presets: [
    '@vue/app',
    ['@babel/preset-env', // 添加 babel-preset-env 配置
      {
        modules: false,
      },
    ],
  ],
  plugins: [ // element官方教程
    [
      'component',
      {
        libraryName: 'element-ui',
        styleLibraryName: 'theme-chalk',
      },
    ],
    ['@babel/plugin-proposal-decorators', { legacy: true }],
    ['@babel/plugin-proposal-pipeline-operator', { proposal: 'smart' }],
    '@babel/plugin-proposal-do-expressions',
    '@babel/plugin-proposal-function-bind',
    '@babel/plugin-proposal-partial-application',
    // ?. ?? 新语法babel编译插件
    ['@babel/plugin-proposal-optional-chaining'],
    ['@babel/plugin-proposal-nullish-coalescing-operator'],
  ],
};
